package course3;

public class cat {
    private String name;
    private String sex;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    public void Cat(String name,String sex,int age){
        setName(name);
        setSex(sex);
        setAge(age);
    }
    public static void main(String [] args){
        cat c1=new cat();
        c1.Cat("Mimi","雌",3);
        System.out.println("猫咪名字："+c1.getName());
        System.out.println("性别："+c1.getSex());
        System.out.println("年龄："+c1.getAge());
    }

}
